package com.xjj.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xjj.entity.ParentAdvice;
import org.apache.ibatis.annotations.Select;

public interface ParentAdviceMapper extends BaseMapper<ParentAdvice> {

    @Select("select * from xjj_parent_advice where advice_id = #{adviceId} and parent_id = #{parentId}")
    ParentAdvice getAdvice(ParentAdvice advice);

    @Select("select count(*) from xjj_parent_advice where advice_id = #{adviceId}")
    Integer getReadNum(ParentAdvice advice);
}
